import request from '@/utils/request'

const threeProject = {
  list (params) {
    return request.get('/kjxm/threeProject/list', { params })
  },
  add (data) {
    return request.post('/kjxm/threeProject/add', data);
  },
  edit (data) {
    return request.post('/kjxm/threeProject/update', data);
  },
  del (id) {
    return request.post(`/kjxm/threeProject/delete/${id}`);
  },
  get (id) {
    return request.get(`/kjxm/threeProject/detail/${id}`);
  },
  getAll (id) {
    return request.get(`/kjxm/threeProject/allDetail/${id}`);
  },
  getAllHide (id) {
    return request.get(`/kjxm/threeProject/partDetail/${id}`);
  },
  myList (params) {
    return request.get(`/kjxm/threeProject/myList`, { params });
  },
  applyList (params) {
    return request.get(`/kjxm/threeProject/projectList`, { params });
  },
  applyMyList (params) {
    return request.get(`/kjxm/threeProject/myProjectList`, { params });
  },
  // 提交附件
  submitFinish (data) {
    return request.post('/kjxm/threeProject/submitFinish', data);
  },
  // 检验申报资格
  qualification (data) {
    return request.post('/kjxm/threeProject/qualification', data);
  },
  projectList (data) {
    return request.get('/kjxm/threeProject/list', data);
  },
  projectSubmit (data) {
    return request.post(`/kjxm/threeProject/submit`, data);
  },
  projectOldSubmit (data) {
    return request.post(`/kjxm/threeProject/submitHistory`, data);
  },
  projectPDF (id) {
    return request.post(`/kjxm/threeProject/createPdf/${id}`, {}, {});
  },
  projectTestPDF (id) {
    return request.post(`/kjxm/threeProject/createPdfByWindows/${id}`, {}, {});
  },
  jttList (params) {
    return request.get('/kjxm/threeProject/listForJtt', { params })
  },
  jttMyList (params) {
    return request.get('/kjxm/threeProject/myListForJtt', { params })
  },
  myAchievementList (params) {
    return request.get('/kjxm/threeProject/myAchievementList', { params })
  },
  achievementList (params) {
    return request.get('/kjxm/threeProject/achievementList', { params })
  },
  zjmsList (params) {
    return request.get('/kjxm/threeProject/zjmsList', { params })
  },
  // 获取名称相似的项目列表
  getSimilarProjectByName (data) {
    return request.post(`kjxm/threeProject/getSimilarProjectByName`, data)
  },
  literatureGet (id, phaseType) {
    return request.get(`/kjxm/literature/getByIdAndPhaseType/${id}/${phaseType}`);
  },
  // 项目终止
  terminate (data) {
    return request.post(`/kjxm/threeProject/terminate`, data);
  },
  // 查询公路数据项目
  roadDataList (params) {
    return request.get('/kjxm/threeProject/roadDataList', { params })
  },
  //
  myJoinList (params) {
    return request.get('/kjxm/threeProject/myJoinList', { params })
  },
  getNewAll (id) {
    return request.get(`/kjxm/threeProject/newAllDetail/${id}`);
  },
  getDigestById (id) {
    return request.get(`/kjxm/threeProject/getDigestById/${id}`);
  },
}

export default threeProject;
